<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>コントロールパネル</title>
    <link href="./assets/styles/default.css" rel="stylesheet" />
    <script src="./assets/scripts/libs/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="./assets/scripts/plugins/jquery.tagsinput.min.js" type="text/javascript"></script>
    <script src="./assets/scripts/import.js" type="text/javascript"></script>  
    <script type="text/javascript">
            $(function() {
               setTreeView("#category");
            });
    </script>
</head>
<body>
{include file='include/header.inc.html'}
<div id="container">
	<aside id="accordion">
    	<div id="aside_inner">
            {include file='include/menu.inc.html'}
        </div>
    </aside>
    
    <article>
    	<h2><span>&nbsp;</span>Category<p><a href="javascript:;">Open Plugins</a></p></h2>
        <nav>
        	<ul>
            	<li class="active"><a href="{$smarty.server.SCRIPT_NAME}"><span>カテゴリマスタ</span></a></li>
			</ul>
        </nav>
        
        <section id="content">
        
        	<h3>カテゴリマスタ</h3>
            
            <div id="treecontrol" class="treecontrol">
                <ul>
                    <li><a title="Collapse the entire tree below" href="#">全て閉じる</a></li>
                    <li><a title="Expand the entire tree below" href="#">全て開く</a></li>
                </ul>
            </div>
            
			<div id="categoryDiv" class="clear">
			
				<ul id="category" class="treeview-gray">
					<li><a href="{$smarty.server.SCRIPT_NAME}?op=edit&id=1&level=1">ルートカテゴリ</a>
						<ul>
                                    {foreach from=$child[1] key=k item=v}
                                        <li><a href="{$smarty.server.SCRIPT_NAME}?op=edit&id={$k}&level={$v.level}">{$v.category_name}</a>
                                            {if $child[$k]|@count > 0}
                                                            <ul>
                                                {foreach from=$child[$k] key=kk item=vv}
                                                                <li><a href="{$smarty.server.SCRIPT_NAME}?op=edit&id={$kk}&level={$vv.level}">{$vv.category_name}</a>
                                                    {if $child[$kk]|@count > 0}
                                                                    <ul>
                                                        {foreach from=$child[$kk] key=kkk item=vvv}
                                                                        <!--li><a href="category_form.php?id={$kkk}&level={$vvv.level}">{$vvv.category_name}</a></li-->
                                                                        <li>{$vvv.category_name}</li>
                                                        {/foreach}
                                                                    </ul>
                                                    {/if}
                                                                </li>
                                                {/foreach}
                                                            </ul>
                                            {/if}
                                        </li>
                                    {/foreach}
						</ul>
					</li>
				</ul>
			</div>
		</section>
    </article>
    
</div>

{include file='include/footer.inc.html'}

</body>
</html>